import request from '@/utils/request'

// 查询书籍分组列表
export function listBookgroup(query) {
  return request({
    url: '/book/bookgroup/list',
    method: 'get',
    params: query
  })
}

// 查询书籍分组详细
export function getBookgroup(id) {
  return request({
    url: '/book/bookgroup/' + id,
    method: 'get'
  })
}

// 新增书籍分组
export function addBookgroup(data) {
  return request({
    url: '/book/bookgroup',
    method: 'post',
    data: data
  })
}

// 修改书籍分组
export function updateBookgroup(data) {
  return request({
    url: '/book/bookgroup',
    method: 'put',
    data: data
  })
}

// 删除书籍分组
export function delBookgroup(id) {
  return request({
    url: '/book/bookgroup/' + id,
    method: 'delete'
  })
}